home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
graphics
/
mfpic
/
setup
/
dos
/
mfpic-bat.4dos
< prev
next >
Wrap
Internet Message Format
|
1992-11-25
|
7KB
From root Sat Sep 12 19:37:54 1992
Received: from munnari.OZ.AU by luxor.latrobe.edu.au (AIX 3.1/UCB 5.61/4.03)
id AA30340; Sat, 12 Sep 92 19:37:52 +1000
Received: from uunet by munnari.oz.au with UUCP (5.83--+1.3.1+0.50)
id AA09629; Sat, 12 Sep 1992 19:35:37 +1000 (from emtex-user-request@methan.chemie.fu-berlin.de)
Received: from methan.chemie.fu-berlin.de by relay1.UU.NET with SMTP
(5.61/UUNET-internet-primary) id AA21065; Sat, 12 Sep 92 04:54:34 -0400
Received: by methan.chemie.fu-berlin.de (/\@@/\ Smail3.1.25.1 #25.25)
id <m0mT2Wn-00002Va>; Fri, 11 Sep 92 06:22 MES
Message-Id: <MAILQUEUE-101.920911001637.384@fasecon.econ.nyu.edu>
To: emtex-user@methan.chemie.fu-berlin.de
From: "Sunando Sen" <SENS@fasecon.econ.nyu.edu>
Date: 11 Sep 92 00:16:37 EST
Subject: Re: mfpic.bat - process a tex file with mfpic graphs
Reply-To: sens@fasecon.econ.nyu.edu
X-Mailer: Pegasus Mail v2.3 (R3).
Precedence: bulk
Status: RO
Dear emTeX users,
I have made a slightly enhanced version of Jacques Gelinas' mfpic.bat. To
use it, you will need 4dos, a shareware replacement for DOS's command.com.
If you are using 4os2, the OS/2 version of 4dos, you can simply rename the
file to mfpic.cmd (renaming it to mfpic.btm should also work). It should
also be possible to rewrite the script in REXX, for those OS/2 users who
do not use 4os2. I might do it if there is sufficient interest.
Please go over the file to make the necessary changes to the paths and
the names of the executables. Some of the lines are pretty long (don't
worry, 4dos can handle them), hopefully they won't get mangled over the
wires.
Basically, this batch file gives you the chioce of printing and/or
previewing the resulting dvi file. It also puts the tfm and pk files
where TeX and the dvidrv programs want them to be. Finally, before
exiting it cleans up all the files created by the mfpic run.
Sincerely,
Sunando Sen
sens@fasecon.econ.nyu.edu
--------------------------- cut here --------------------------------
@echo off
rem mfpic.bat - process a tex file including mfpic graphs
rem WARNING! THIS BATCH FILE NEEDS 4DOS OR 4OS2.
rem 4dos is an excellent shareware command shell for MS-DOS,
rem what command.com should have been.
rem You can get 4dos from any SIMTEL20 mirror site in the directory
rem msdos/4dos
rem two such sites are wuarchive.wustl.edu & oak.oakland.edu
rem If you are using OS/2, you will need 4os2.
rem Rename this batch file to mfpic.cmd
rem 4os2 can found at hobbes.nmsu.edu in the directory
rem pub/os2/all/shells
rem Vars needed: set emtexdrv=c (assuming usual emtex installation)
rem Files needed: c:\emtex\texinput\mfpic.tex c:\emtex\mfinput\graphbas.mf
rem first tex pass creates what.mf and an incomplete what.dvi
if "%1"=="" goto usage
SET TEXINPUT=c:\emtex\texinput
SET BTEXFMT=c:\emtex\btexfmts
SET TEXTFM=c:\emtex\tfm;c:\emtex\texfonts\tfm
tex386 &plain %1
del %1.dvi
SET MFINPUT=.;c:\emtex\mfinput
SET BMFBAS=c:\emtex\bmfbases
SET MFJOB=c:\emtex\mfjob
rem metafont pass generates what.300gf and what.tfm
for %%f in (*.mf) do mf386.exe &plain \mode=hplaser; input %%f
rem gftopk pass converts what.300gf to what.pk
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do gftopk %%f
rem move the pk files to the directory where dvidrv expects them
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do move %@NAME[%%f].pk c:\emtex\texfonts\pixel.lj\%@EXT[%%f]dpi
rem move the tfm files to the directory where TeX expcets them
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do move %@NAME[%%f].tfm c:\emtex\texfonts\tfm
rem second tex pass creates final what.dvi, using .\what.tfm
tex386 &plain %1
rem set textfm=c:\emtex\tfm;.
rem tex %1
rem set textfm=
rem ask if you want to print it or preview it
rem after 10 seconds go to preview automatically
set ANSWER=V
inkey/w10 /k"VPQ" Do you want to pre(V)iew, (P)rint, or (Q)uit? %%ANSWER
if "%ANSWER"=="P" goto printout
if "%ANSWER"=="Q" goto cleanup
rem call previewer with the following paths
rem % lj.cnf (300x300 DPI using LJ fonts)
rem /pd={,c:\emtex\doc\{english,latex}\,$DVIDRVINPUT:}@i
rem /pl={c:\texfonts\,$DVIDRVFONTS:}lj_{0,h,1,2,3,4,5a,5b,sli}
rem /pf={,{c:\texfonts\,$DVIDRVFONTS:}pixel.lj\@Rrdpi\}@f{.pk,.pxl}
rem dvidrv
dviscr7 @lj.cnf /fl=-1 /fb /ocr=1 /oa14 /o4 %1
rem now ask if you want to print it ...
set TEXPRT=N
inkey/w10 /k"YN" Do You want to print your work of art? (Y/N) %%TEXPRT
if "%TEXPRT"=="Y" goto printout
rem if not, get rid of all the junk!
:cleanup
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del c:\emtex\texfonts\pixel.lj\%@EXT[%%f]dpi\%@NAME[%%f].pk
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del c:\emtex\texfonts\tfm\%@NAME[%%f].tfm
for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del %@NAME[%%f].*
for %%f in (*.dvi *.log *.?lg) do del %%f
rem not to mention all the environment vars
SET TEXINPUT=
SET BTEXFMT=
SET TEXTFM=
SET MFJOBOPT=
SET MFINPUT=
SET BMFBAS=
SET MFJOB=
SET ANSWER=
SET TEXPRT=
goto end
:printout
dvihplj7 @lj.cnf /po=prn /fl=-1 /fb %1
goto cleanup
:usage
echo Usage: mfpic what
echo ------------------------------------------start of what.tex-----------
--
echo \input mfpic
echo \opengraphsfile{what1}
echo \picture[20]{-3}{3}{-3}{3}
echo \axes
echo \function{-2,2,0.1,(x**3-x)/3}
echo \endpicture
echo \closegraphsfile
echo The first line opens up the picture environment and
echo establishes the coordinate system. The coordinate scale
echo is 20 points per coordinate unit (x- and y-axis scales
echo the same in this case), with bounds on both axes being -3 and 3.
echo The second line draws the axes. The third line
echo plots a smooth Bezier interpolation of the function
echo $f(x)=(x^3-x)/3$ on the domain $-2<=x<=2$, through points
echo with x values 0.1 units apart.
echo The fourth line closes the picture environment.
echo Regards, Tom Leathrum, moth@dartmouth.edu
echo \bye
echo ------------------------------------------end of what.tex------------
-
:end
rem J. Gelinas, 9 sept 1992, gelinas@cmr.ca
rem with some modest changes by Sunando Sen, 10 sept 1992,
rem sens@fasecon.econ.nyu.edu
--------------------------- cut here --------------------------------